Relational database systems store tables of data arranged in rows and columns, and which are typically linked by relationships that simplify data storage and make queries of the stored data more efficient. Structured query language (SQL) is a standardized language for creating and operating on relational databases. When receiving a query, such as from a system external to the database system (e.g. a web browser), a database system typically employs a query optimizer to construct a query plan that provides the most efficient way to execute the query (i.e. an optimal query plan).
To produce an optimal query plan, the query optimizer uses statistics associated with the involved data (e.g. a column of data), such as the number of unique values and cardinality estimates, for example. Cardinality estimates, in-turn, rely on histogram statistics of the involved table columns. In Enterprise Data Warehouse environments, content of the tables changes frequently. As a result, it is also necessary to frequently update database statistics so that the statistics accurately reflect the content changes and enable the query optimizer to continue providing optimal query plans.